#include "drmDisplay.h"
#include "ffmpegPlayer.h"
#include <iostream>
#include <stdio.h>

int main(int argc, char *argv[])
{
	int ret = 0;
	if (argc != 2) {
		std::cout << "Usage: ./main <input_video_path>" << std::endl;
		return 1;
	}

	C_DRMDisplay cDRMDisplay;
	// drm 驱动文件名称
	cDRMDisplay.SetFilePath("/dev/dri/card0");
	if (cDRMDisplay.InitDRMParam()) {
		return -1;
	}

	C_FfmpegPlayer cFfmpegPlayer;
	cFfmpegPlayer.SetFilePath(argv[1]);
	// 插件名称
	cFfmpegPlayer.SetHwdevice("rkmpp");
	if (cFfmpegPlayer.InitFfmpeg())
		return -1;

	cFfmpegPlayer.Play(cDRMDisplay);

	return 0;
}